package ooday05exercise;

public class EnumDemo {
    public static void main(String[] args) {
        Season[] seasons=Season.values();//获取Season枚举值，放在数组中

        for (int i=0;i< seasons.length;i++){
            System.out.println(seasons[i]);//输出4个枚举值
            System.out.println(seasons[i].getSeasonName());//输出枚举值的名字属性
            System.out.println(seasons[i].getSeasonDesc());//输出枚举值的描述属性

        }
        Season season=Season.SPRING;//获取SPRING对象
        System.out.println(season.getSeasonName()+","+season.getSeasonDesc());
        switch(season){
            case SPRING:
                System.out.println(season.getSeasonDesc()+",我们去放风筝。。。");
                break;
            case AUTUMN:
                System.out.println(season.getSeasonDesc()+",我们去爬山");
                break;
            case SUMMER:
                System.out.println(season.getSeasonDesc()+",我们去游泳");
                break;
            case WINTER:
                System.out.println(season.getSeasonDesc()+",我们去滑雪");
                break;
        }


    }
}
